import type { Router } from 'vue-router'
import { LoadingBar } from 'quasar'

export function createProgressGuard(router: Router) {
  router.beforeEach((to, from, next) => {
    LoadingBar.start()
    next()
  })
  router.afterEach((to) => {
    LoadingBar.stop()
    console.log('路由切换完毕！！！', to)
  })
}
